package com.jzo2o.customer.controller.operation;


import com.jzo2o.common.model.PageResult;
import com.jzo2o.customer.model.domain.WorkerCertification;
import com.jzo2o.customer.model.domain.WorkerCertificationAudit;
import com.jzo2o.customer.model.dto.request.CertificationAuditReqDTO;
import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditAddReqDTO;
import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditPageQueryReqDTO;
import com.jzo2o.customer.model.dto.response.RejectReasonResDTO;
import com.jzo2o.customer.service.WorkerCertificationAuditService;
import com.jzo2o.mvc.utils.UserContext;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController("operationWorkerCertificationAuditController")
@RequestMapping("/operation/worker-certification-audit")
@Api(tags = "地址 - 地址相关接口")
public class WorkerCertificationAuditController {

    //http://localhost:3000/api/customer/operation/worker-certification-audit/page?
    // isAsc1=false&orderBy1=createTime&pageNo=1&pageSize=10&_t=1724221835906

    @Resource
    WorkerCertificationAuditService workerCertificationAuditService;


    @GetMapping("/page")
    public PageResult<WorkerCertificationAudit>  pageList(WorkerCertificationAuditPageQueryReqDTO workerCertificationAuditPageQueryReqDTO){

        return workerCertificationAuditService.pageList(workerCertificationAuditPageQueryReqDTO);
    }



    @PutMapping("/audit/{id}")
    @ApiOperation("审核服务人员认证信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "认证申请id", required = true, dataTypeClass = Long.class)
    })
    public void auditCertification(@PathVariable("id") Long id, CertificationAuditReqDTO certificationAuditReqDTO) {
        workerCertificationAuditService.auditCertification(id, certificationAuditReqDTO);
    }






}
